x86: optimize this_cpu()
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 13 Jul 2010 17:17:28 +0000 (18:17 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 13 Jul 2010 17:17:28 +0000 (18:17 +0100)
commitddf3a0035f8bf9018cf1577826e0d35a6829e3a1
treefda21bee0ae920e2d6ad1a8db42029620da5584d
parentd0a3c6c7a14fc7f8ed4007656dcc4f0ad0a6f030
x86: optimize this_cpu()

Besides the .text space savings of over 2.5k on x86-64 (1.5k for
x86-32) this removes a load (plus a lea on x86-64) from various
frequently executed code paths, and finally provides a reason (other
than legibility) to prefer this_cpu() over per_cpu() in all places
where smp_processor_id() isn't being called anyway.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/include/asm-x86/current.h
xen/include/asm-x86/percpu.h